<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>App</h1>
    <p>
      this p tag
      <b>lucy</b>
      <i>jack</i>
    </p>
    <div>
      this divs
      <span>hello</span>
      <b>!!</b>
    </div>
    <script>
      const p = document.body.childNodes[3];

      const pnodes = p.childNodes;

      console.log(Array.from(pnodes));
      console.log([...pnodes]);

      for (let node of pnodes) {
        console.log(node);
      }
    </script>
  </body>
</html>
